import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Window 2.0
import QtQuick.Dialogs 1.0
import QtQuick.XmlListModel 2.0

Rectangle {
    id: componentButton

    property alias text: textPanelMenuButton.text
    property alias horizontalAlignment: textPanelMenuButton.horizontalAlignment

    signal clicked()

    height: 20
    anchors.left: parent.left
    anchors.right: parent.right
    border.color: "white"
    border.width: 1
    
    Text {
        id: textPanelMenuButton
        anchors.verticalCenter: parent.verticalCenter
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.margins: 6
        color: "white"
    }
    
    MouseArea {
        id: mouseAreaPanelMenuButton
        hoverEnabled: true
        anchors.fill: parent

        onClicked: { componentButton.clicked(); }
    }
    
    color: mouseAreaPanelMenuButton.containsMouse ? "black" : "transparent"
}
